package sh.wn36.vehiclemanage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import sh.wn36.vehiclemanage.entity.InsuranceRecord;
import sh.wn36.vehiclemanage.entity.entity_cjl.reminder.Reminder_insuranceRecordService;
import sh.wn36.vehiclemanage.mapper.InsuranceRecordMapper;
import sh.wn36.vehiclemanage.service.InsuranceRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import sh.wn36.vehiclemanage.xzy.InsuranceInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 * @author xk
 * @since 2021-04-26
 *
 */
@Service
public class InsuranceRecordServiceImpl extends ServiceImpl<InsuranceRecordMapper, InsuranceRecord> implements InsuranceRecordService {

    @Autowired
    private InsuranceRecordMapper insuranceRecordMapper;

    @Override
    public IPage<InsuranceInfo> getAll(Page<InsuranceInfo> page, QueryWrapper<InsuranceInfo> wrapper) {
        return insuranceRecordMapper.selectPage(page,wrapper);
    }


    @Override
    public List<Reminder_insuranceRecordService> listReminder_insuranceRecordService() {
        List<Reminder_insuranceRecordService> reminder_insuranceRecordServices = insuranceRecordMapper.listReminder_insuranceRecordService();
        return reminder_insuranceRecordServices;
    }

    @Override
    public List<Map<String, Object>> reportList() {
        return insuranceRecordMapper.reportList();
    }

    @Override
    public List<Map<String, Object>> queryReportByCarId(Integer carId) {
        return insuranceRecordMapper.queryReportByCarId(carId);
    }
}
